package cn.com.miaoto.base.common;

import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * Created by guo.chen on 2018/12/13.
 */
public class PageResult<T> extends PageInfo<T> {
    private Integer code;
    private String msg;
    private List<T> data;
    private long count;

    public PageResult() {
    }

    public PageResult(List<T> list) {
        super(list);
        this.code = 0;
        this.data = list;
        this.count = this.getTotal();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }
}
